// Xd3d9Render.cpp : Defines the entry point for the DLL application.
//

#include "stdafx.h"
#include "setup.h"
#include "xd3d9RenderSystem.h"



#ifdef _MANAGED
#pragma managed(push, off)
#endif

BOOL APIENTRY DllMain( HMODULE hModule,
					  DWORD  ul_reason_for_call,
					  LPVOID lpReserved
					  )
{
	return TRUE;
}

#ifdef _MANAGED
#pragma managed(pop)
#endif

namespace XE
{




	HRESULT  Create3DRenderDevice(HINSTANCE instan,XRenderSystem** pRenderSystem)
	{
		if(*pRenderSystem!=NULL)
		{
			delete *pRenderSystem;
		}

		*pRenderSystem = new xd3d9RenderSystem(instan);
		return X_OK;

	}
	HRESULT ReleaseRenderDevice(XRenderSystem* pRender)
	{
		if(pRender!=NULL)
		{
			delete pRender;
			pRender = NULL;
			return X_OK;
		}

		return X_FAIL;

	}


}